All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.EndpointDescriptor

java.lang.Object
   |
   +----sun.server.EndpointDescriptor

public abstract class EndpointDescriptor
extends Object
Endpoint descriptors are used to administer network services. Each network service is made available at a particular transport address, and with certain characteristics. Those characteristics are described using an endpoint descriptor, administered as part of the service.

Characteristics of a transport endpoint include addressing information, some kinds of security characteristics, compression, bandwidth, latency, and more. In particular, there are different kinds of transport endpoints, corresponding to different qualities of service, such as:

Higher level aspects of the configuration for a network service are administered using different interfaces. Endpoint Descriptors only affect transport level characteristics; application level protocols usually depend on having a particular quality of service from their transport level protocol(s).


The intent of this framework is to let subclasses control their own persistence (or lack thereof), as part of being the locus for all integrity checking policies. The current use of "ServiceConfiguration" prevents that, but that feature should reappear in the future.


Constructor Index

 o EndpointDescriptor()

Method Index

 o fromConfig(ServiceConfiguration, String)
The default endpoint representation is currently a property set with a distinguished key "endpoint.class", used to identify which endpoint class is used.
 o getAdminAppletClass()
Hook to administer these objects.
 o getCriticalKeys()
Lists the keys which initializeDescriptor absolutely requires to be made available to it.
 o getDefault(Object)
Returns the default value of a given key.
 o getDescriptorKeys()
Lists the keys understood by initializeDescriptor, including ones which have default values.
 o getValue(Object)
Returns the current value corresponding to a given key.
 o initialize(Properties)
Initializes the descriptor from the key/value pairs found in a hashtable.
 o saveProperty(String, String)
Saves persistent state associated with a given key.
 o setValue(Object, Object)
Sets the value corresponding to a given settable key.

Constructors

 o EndpointDescriptor
 public EndpointDescriptor()

Methods

 o fromConfig
 public static EndpointDescriptor fromConfig(ServiceConfiguration config,
                                             String endpoint) throws ConfigurationException
The default endpoint representation is currently a property set with a distinguished key "endpoint.class", used to identify which endpoint class is used. An instance of that classs is created and then initialized using the properties. When used with ServiceConfiguration, this must be a property "group".

Parameters:
config - set of property files to choose from
endpoint - which one of those property files to use
Throws: ConfigurationException
if the configuration data is invalid
 o getAdminAppletClass
 public abstract String getAdminAppletClass()
Hook to administer these objects. This returns the name of an applet class which can be instantiated within a GUI framework, and which then understands how to administer this particular kind of object.

 o getCriticalKeys
 public abstract Vector getCriticalKeys()
Lists the keys which initializeDescriptor absolutely requires to be made available to it. All other keys have default values. Note that subclasses may provide defaults for values that superclasses provide.

 o getDescriptorKeys
 public abstract Vector getDescriptorKeys()
Lists the keys understood by initializeDescriptor, including ones which have default values.

 o getDefault
 public abstract Object getDefault(Object key)
Returns the default value of a given key.

Parameters:
key - identifies which default value is requested
 o getValue
 public abstract Object getValue(Object key)
Returns the current value corresponding to a given key.

Parameters:
key - identifies which current value is requested
 o initialize
 protected abstract void initialize(Properties props) throws ConfigurationException
Initializes the descriptor from the key/value pairs found in a hashtable. The keys and values understood by the descriptor are specific to the kind of connection, although conventions are defined for the following string-valued keys:

Keys provided in the hashtable must be understood by the descriptor; it is an error to provide keys which are not explicitly supported by the descriptor. Similarly, it is an error not to provide values for the "critical" keys.

Parameters:
props - a set of key/value pairs used to initialize the descriptor
Throws: ConfigurationException
indicates that the data in the hashtable has problems.
See Also:
getDescriptorKeys, getCriticalKeys
 o setValue
 public abstract void setValue(Object key,
                               Object value) throws IOException
Sets the value corresponding to a given settable key. The individual endpoint will report errors when these keys or values are not valid.

Parameters:
key - the key used to look up the value
value - the value being set
Throws: IOException
if the property can't be saved
 o saveProperty
 protected void saveProperty(String propKey,
                             String encodedValue) throws IOException
Saves persistent state associated with a given key. This is for use only by the endpoint implementations, since for now they do not have the ability to affect their own persistence models.

Parameters:
propKey - string form of key used to look up the value
encodedValue - string-encoded form of the value being set
Throws: IOException
if the property can't be saved

All Packages  Class Hierarchy  This Package  Previous  Next  Index